package com.dabai.iot.core.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 设备日志查询
 *
 * @author kev1n
 */
@Data
public class AlarmRecordQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 告警规则id
     */
    @Schema(description = "告警规则id")
    private Long alarmId;

    /**
     * 产品id
     */
    @Schema(description = "产品id")
    private Long productId;

    /**
     * 设备id
     */
    @Schema(description = "设备id")
    private Long deviceId;

    /**
     * 跟踪ID
     */
    @Schema(description = "跟踪ID")
    private String traceId;

    /**
     * 查询时间起
     */
    @Schema(description = "查询时间起")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryStartTime;

    /**
     * 查询时间止
     */
    @Schema(description = "查询时间止")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryEndTime;

}
